﻿using System;
using System.Collections;
using System.Linq;
using System.Text;

namespace _01_ReadWOrdsWithSpaceDelimiter
{
    class ReadWordsWithSpaceDelimiter
    {
        private static char[] separator = new char[] {' '};

        static void Main(string[] args)
        {
            Console.Write("Enter a list of words <separated by spaces>: ");
            string listOfWords = Console.ReadLine();

            string[] words = listOfWords.Split(separator);
            Array.Sort<string>(words);

            foreach(var word in words)
            {
                Console.WriteLine(word);
            }
        }
    }
}
